import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Counting
{
	public void Count(String Line)
	{
		int wstart=0;
		int orin=0;
		int length3=0;
		String[] word=Line.split(" ");
		if(word.length==0||Line.length()==0) {System.out.println("Empty input.Try again");return;}
		for(int i=0;i<word.length;i++)
		{	
			if(word[i].startsWith("w")||word[i].startsWith("W"))
				wstart++;
			if(word[i].length()==3)
				length3++;
			if(word[i].contains("or")||word[i].contains("Or")||word[i].contains("oR")||word[i].contains("OR"))
				orin++;
		}
		System.out.println("The number of words start with W is " + wstart);
		System.out.println("The number of words include OR is " + orin);
		System.out.println("3 length words' number is " + length3);
	}
	
	String getInput()throws IOException
	{
		BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
		return input.readLine();
	}
	
	public static void main(String[] args)throws IOException
	{
		Counting mycounting=new Counting();
		System.out.println("Please Input!");
		String Line=mycounting.getInput();
		mycounting.Count(Line);
	}
}